package com.sikaryofficial.qrcode.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import static com.sikaryofficial.qrcode.constant.ProductConstant.CONTENT_QR_CODE_ROW_HEIGHT;


@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ExcelIgnoreUnannotated
@ContentRowHeight(CONTENT_QR_CODE_ROW_HEIGHT)
public class ProductQrExportVO {
    /**
     * 产品ID
     */
    @ExcelIgnore
    private Long brandTasteId;

    /**
     * 产品MD5  'md5(CONCAT(t.brand_no,''_'',t.model,''_'',t.style,''_'',t.taste_name))组合'
     */
    @ExcelIgnore
    private String md5;
    /**
     * 品牌编码
     */
    @ExcelIgnore
    private String brandNo;
    /**
     * 型号
     */
    @ExcelIgnore
    private String model;

    /**
     * 口味名称
     */
    @ExcelIgnore
    private String tasteName;

    /**
     * 产品名称
     */
    @ExcelIgnore
    private String productName;

    @ExcelIgnore
    private Integer qrYearMonth;

    /**
     * 序号
     */
    // @ColumnWidth(16)
    // @ExcelProperty(value = "序号", index = 0)
    @ExcelIgnore
    private Long seqNo;

    /**
     * 产品名称
     * <p>
     * 品牌 + 型号 + 口味 + 名称 + qrNum
     */
    @ExcelIgnore
    private String productNameEn;

    @ColumnWidth(62)
    @ExcelProperty(value = "二维码地址", index = 0)
    private String qrUrl;

    @ColumnWidth(25)
    @ExcelProperty(value = "防伪码", index = 1)
    private String param;

    /** 品牌口味短ID */
    @ExcelIgnore
    private Integer productShortId;
}
